//
//  RouteItemCell.m
//  Traveling
//
//  Created by 尹桥印 on 15/6/22.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "RouteItemCell.h"
@interface RouteItemCell()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@end

@implementation RouteItemCell

+(instancetype)cellWithTableView:(UITableView *)tableView section:(NSInteger)section{
    static NSString *identifier = @"RouteItemCell";
    RouteItemCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    cell.section = section;
    return cell;
}

-(void)setItemRouteInfo:(ItemRouteInfo *)itemRouteInfo{
    _itemRouteInfo = itemRouteInfo;
    self.nameLabel.text = itemRouteInfo.itemName;
}

- (IBAction)deleteBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(routeItemCellDeleteWithSection:itemRouteInfo:)]) {
        [self.delegate routeItemCellDeleteWithSection:self.section itemRouteInfo:self.itemRouteInfo];
    }
}


@end
